export const gotoBack = () => {
  uni.navigateBack({
    delta: 1
  })
}

export function timestampToDateFormat(timestamp: number) {
  
  console.log(timestamp)
  const date = new Date(timestamp); // 注意要乘以 1000，因为时间戳单位是秒而不是毫秒

  const year = date.getFullYear();
  const month = (date.getMonth() + 1).toString().padStart(2, '0');
  const day = date.getDate().toString().padStart(2, '0');

  return `${year}-${month}-${day}`;
}